# -*- coding: utf-8 -*-
# @Author : zhaochen
# @Date   : 2019/8/5
# @File   : RP_DataIsNull.py
# @E-mail : zhaochen@bbdservice.com


'''eof
name:关联方数据是否异常
code:RP_DataIsNull
tableName:
columnName:
groups:关联方
dependencies:EG_BBD
type:常用指标
dataSourceType:在线指标
description:
eof'''

import sys

reload(sys)
sys.setdefaultencoding('utf-8')



def RP_DataIsNull():
    try:
        R1PerRatio = EG_BBD["R1PerRatio"]#
        R12Num = EG_BBD["R12Num"]#
        R1EntLitigation = EG_BBD["R1EntLitigation"]#
        R2EntLitigation = EG_BBD["R2EntLitigation"]#
        InvestInMax = EG_BBD["InvestInMax"]#
        R12PerRatio = EG_BBD["R12PerRatio"]#
        R1Num = EG_BBD["R1Num"]#

        InvestOutMax = EG_BBD["InvestOutMax"]#


        if R1PerRatio == u'缺失值' and R12Num == u'缺失值' and R1EntLitigation == u'缺失值' \
            and R2EntLitigation == u'缺失值' and InvestInMax == u'缺失值' and R12PerRatio == u'缺失值'\
            and R1Num == u'缺失值' and InvestOutMax == u'缺失值':
            raise Exception(u'关联方数据异常')
        else:
            return 0
    except:
        raise Exception(u'关联方数据异常')

result = RP_DataIsNull()